Method of and apparatus for testing a server

ABSTRACT

A method for testing a server. A component ( 2 ) captures a session consisting of requests of and responses from a server ( 3 ). The captured session is stored as script files ( 4, 5 ). A GUI component ( 6 ) facilitates the identification of variable data ( 30 ) within the script files. Variable data is data which may vary from session to session. The identification process generates a database ( 14 ) with field headers ( 18 ) corresponding to the types of data identified ( 15 ). A component populates the database ( 13 ). A driver component ( 9 ) uses the script files ( 11, 12 ) and the database ( 13 ) to test the server ( 3 ) by running multiple threads ( 10 ) each directing their own session with the server. Where data within the script files has been identified as variable data ( 13 ) the thread may substitute data from the database ( 13 ). A server testing apparatus and software for implementing the method is also disclosed.

FIELD OF INVENTION

The present invention relates to a method of testing a server. Moreparticularly, but not exclusively, the present invention relates to amethod of load testing a web server.

BACKGROUND TO THE INVENTION

Standard approaches to testing web servers involve creating scriptsusing a programming language and using a driver program to run thesescripts to test a server. A disadvantage to this approach is that theindividuals who are testing the web server must be competent in using aprogramming language.

Another approach involves the capture of traffic between a user and theserver. This captured script can be then used to load test the webserver by running multiple simultaneous instances using a driverprogram. Programs that implement this approach include LoadRunner andAstra SiteTest. This approach has a number of disadvantages. Firstly itcan be difficult to thoroughly test a server as the script when used bymultiple instances is unchanged, therefore only one type of user istested. Secondly, a problem arises if the server to be tested requiresunique data, for example unique simultaneous users. The only way forthis approach to overcome the difficulty is by capturing multiple usersessions and having each instance use the script from a differentsession. This can be time-consuming for the user.

SUMMARY OF THE INVENTION

It is an object of the invention to provide a simple method of testing aweb server which thoroughly tests the server without requiring users tohave advanced programming ability, or to at least provide the publicwith a useful choice.

According to the invention there is provided a method of testing aserver, the method including the steps of:

-   -   capturing script files resulting from the interaction between a        server and another device;    -   utilising a Graphical User Interface (GUI) to identify variable        data within the script files;    -   forming a database of substitute values for the variable data;        and    -   testing the server by using one or more separate threads each        selecting data from the database in substitution for the        variable data.

There is further provided software for effecting the method.

There is still further provided a server testing apparatus, theapparatus including:

-   -   means for capturing script files resulting from interaction        between a server and another device;    -   a Graphical User Interface (GUI) responsive to a user input        device for identifying data within the script files;    -   means for forming a database of substitute values for the        variable data; and    -   means for generating one or more separate threads to test a        server based upon the captured script files in which data from        the database is substituted for the variable data.

BRIEF DESCRIPTION OF THE DRAWINGS

A preferred embodiment of the invention will now be described, by way ofexample only, with reference to the accompanying drawings in which:

FIG. 1 illustrates the capture of data and how the data is used to latertest the server.

FIG. 2 illustrates how variable data is identified within the GUI andconverted into a variable data file and a fabricated data file.

FIG. 3 illustrates how the method may be deployed on computer hardware.

FIG. 4 illustrates how the method may be deployed on a single personalcomputer with a processor and memory.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

Referring to FIGS. 1 and 2, a user operates a browser 1 to interact withthe web server 3. The data generated by the user's requests is capturedby a proxy 2 and recorded in an input script file 4. The data generatedby the web server's response is captured by the proxy into an outputscript file 5.

The user then utilises a Graphical User Interface (GUI) 6 to identifydata 7 within the input script file that may change between usersessions (variable data), this data may include user names, userpasswords, and URLs. The GUI assists the user in this process bysearching the input script file for all occurrences of data identifiedby the user as variable data and marking this data as variable data. Theresult of the identification of variable data 29 is stored in a variabledata file 11.

The user may also utilise the GUI 6 to identify data 8 within the outputscript file that can be used to validate the server's response. Theresult of the identification of validation data 30 is stored invalidation data file 12.

The identification of variable data may be used to generate aComma-Separated Variables (CSV) header file 14 with field headers 35corresponding to the types of variable data identified 33. The CSVheader file may be edited by the user using MICROSOFT EXCEL 97™15, orany other spreadsheet program, database program, etc., to fabricatedifferent variable data 34. This file is stored as the fabricated datafile 13.

A driver program 9 is provided which runs a thread 10 which uses thevariable data file 11 to make requests of the server. Where the datawithin the variable data file is identified as variable data 31 thethread may select data from the fabricated data file 13. Data may beselected from the fabricated data file sequentially. Data returned bythe server is verified by the thread using data identified as validationdata 32 within the validation data file 12.

The driver program may run any number of threads each using differentdata in place of variable data and each independently verifying serverresponses.

The threads may run simultaneously or in succession, or some may runsimultaneously and some may run in succession.

The driver program provides the ability to specify different options,including thread options, such as the number of threads, the number ofsimultaneous threads, time delays within thread execution to simulateactual user behaviour; environment options, such as identifying whichvariable data file or fabricated data file to use; and other options,such as specifying the overall duration of the test. An option may beprovided to increase the number of simultaneous threads from zero to aspecified number over the course of the test.

While the invention describes the server as a web server and thesoftware used to interact with the server as a browser, it willappreciated by those skilled in the art that any server may be tested inthis way and any program could be used in place of the browser.

Although the invention has been described with the user generating thefabricated data file from the CSV header file with a spreadsheet programit will be appreciated that any other method of generating thefabricated data file may be used, including computer generation. Forexample, a software module may generate the fabricated data file bycreating random data, by extracting data from another database, or byselecting data from multiple lists and compiling them, randomly or in adefined pattern, into a composite.

Although the invention has been described with the data selected fromthe fabricated data file sequentially it will be appreciated that anyother method of selecting the data may be used. For example, adeterministic random selection process or a hash function may be used.

FIG. 3 shows a possible server testing apparatus connected to a webserver. The browser may be MICROSOFT INTERNET EXPLORER™ running under aMICROSOFT WINDOWS 2000™ environment on a workstation such as a IBMINTELLISTATION Z PRO™ 16. The web server may be running under aMICROSOFT NT™ environment on an IBM XSERIES 250 server device 17.

The proxy program may be running under a MICROSOFT WINDOWS 2000™environment on a computing device such as an IBM INTELLISTATION Z PRO™18. The script files may be stored on a storage device such as an IBMXSERIES 200VL™ 19 file server.

The GUI may be running under a MICROSOFT WINDOWS 2000™ environment on aworkstation such as an IBM INTELLISTATION Z PRO™ 20. The variable datafile and the validation data file may be stored on a storage device suchas an IBM XSERIES 200VL™ 21 file server.

The CSV header file may be stored on a storage device such as an IBMXSERIES 200VL™ 22 file server. The CSV header file may be edited byMICROSOFT EXCEL 97™ running under a MICROSOFT WINDOWS 2000™ environmenton a workstation such as an IBM INTELLISTATION Z PRO™ 23. The fabricateddata file may be stored on a storage device such as an IBM XSERIES200VL™ 24 file server.

The driver program may be running under a MICROSOFT WINDOWS 2000™environment on a workstation such as an IBM INTELLISTATION Z PRO™ 25.

The workstations, the server device, and the file servers may beconnected to one another via a communications systems such as a LocalArea Network (LAN) utilising coaxial cables.

Although this invention has been described with some of the script,variable data, validation data, CSV header and fabricated data filesstored on separate file servers it will be appreciated that the filesmay be stored on a single file server or on internal hard disk drives orin any other storage arrangement.

FIG. 4 shows an implementation utilising a single PC connected to aserver.

The browser, the proxy, the GUI, MICROSOFT EXCEL 97™, and the driverprogram may be running under a MICROSOFT WINDOWS 2000™ environment on asingle workstation such as an IBM INTELLISTATION Z PRO™ 26. Theworkstation may be connected to the web server 27 via a communicationssystem such as a Local Area Network (LAN) utilising coaxial cables. Thescript files, the variable data file, the validation data file, the CSVheader file, and the fabricated data file may be stored on a hard diskdrive such as an IBM DESKSTAR 120GXP™ 28 within the workstation.

Although this invention has been described with the method deployed on anumber of workstations, file servers, and a server; and with the methoddeployed on a single workstation and a server; it will be appreciatedthat the method may be deployed in other arrangements. For example, thebrowser and proxy may be deployed on a single workstation and the GUI,MICROSOFT EXCEL 97™, and driver program may be deployed on a secondsingle workstation.

Although this invention has been described by way of example it is to beappreciated that improvements and/or modifications may be made theretowithout departing from the scope or spirit of the present invention.

1. A method of testing a server, the method including the steps of:capturing script files resulting from the interaction between a serverand another device; utilising a Graphical User Interface (GUI) toidentify variable data within the script files; forming A database ofsubstitute values for the variable data; and testing the server by usingone or more separate threads each selecting data from the database insubstitution for the variable data.
 2. A method as claimed in claim 1wherein the other device is a user device.
 3. A method as claimed inclaim 1 wherein the server is a web server.
 4. A method as claimed inclaim 1 wherein the user interaction with the server occurs via abrowser.
 5. A method as claimed in claim 1 wherein a proxy is used tocapture the interaction with the server.
 6. A method as claimed in claim1 wherein the variable data is user identification data.
 7. A method asclaimed in claim 1 wherein the variable data is product informationdata.
 8. A method as claimed in claim 1 wherein the variable data isuser option data.
 9. A method as claimed in claims 1 wherein variabledata is identified within the GUI by highlighting data.
 10. A method asclaimed in claim 1 wherein variable data is identified within the GUI byusing a mouse device.
 11. A method as claimed in claim 1 wherein the GUIassists identification by using pattern matching to automaticallyidentify as variable data that data which is similar to data alreadyidentified as variable data by the user.
 12. A method as claimed in anyclaim 1 wherein the GUI is used to identify data as validation datawithin the script files and the threads used to test the server use theidentified validation data to verify server responses.
 13. A method asclaimed in claim 1 wherein the database is formed from a delimited filein turn generated from data identified in the GUI.
 14. A method asclaimed in claim 1 wherein the database is formed from a Comma-SeparatedVariables (CSV) header file in turn generated from data identified inthe GUI.
 15. A method as claimed in claim 13 wherein the database ispopulated using a database program.
 16. A method as claimed in claim 13wherein the database is populated using a spreadsheet program.
 17. Amethod as claimed in claim 13 wherein the database is populatedautomatically.
 18. A method as claimed in claim 1 further includingsetting thread options to specify the number of threads to execute whentesting the server.
 19. A method as claimed in claim 1 further includingsetting thread options to specify the number of threads to executesimultaneously.
 20. A method as claimed in claim 19 wherein the numberof threads executed simultaneously is increased from zero to the numberspecified.
 21. A method as claimed in claim 1 further including settingthread options to specify delays affecting the execution of a thread.22. A method as claimed in claim 1 further including setting environmentoptions identifying which files to use as the variable data files andfabricated data files
 23. A method as claimed in any one of thepreceding claims further including setting the duration of the test. 24.Apparatus programmed and configured to perform the method of claim 1 ona server.
 25. A server testing apparatus including: means for capturingscript files resulting from interaction between a server and anotherdevice; a Graphical User Interface (GUI) responsive to a user inputdevice for identifying data within the script files; means for forming adatabase of substitute values for the variable data; and means forgenerating one or more separate threads to test a server based upon thecaptured script files in which data from the database is substituted forthe variable data.
 26. A server testing apparatus as claimed in claim 25including a proxy device for capturing script files resulting frominteraction between a server and another device.
 27. A server testingapparatus as claimed in claim 25 wherein the user input device is amouse device.
 28. A server testing apparatus as claimed in claim 25including a means for assisting the identification of variable data byusing pattern matching to identify as variable data data similar tovariable data identified by the user.
 29. A server testing apparatusclaimed in claim 25 including a means for populating a database.
 30. Aset of instructions and data coded signals which operate as software foreffecting the method of claim 1 when executing on a computer system. 31.Storage media containing software as claimed in claim 30.